package Operation;

import book.BookList;

import java.util.Scanner;

public class Borrow implements IOperation{
    public void work(BookList bookList) {
        System.out.println("借出");
        System.out.println("请输入你要借阅的书籍");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        int index = 0;
        for (int i = 0; i < bookList.getNumberBooksExisted(); i++) {
            if(name.equals(bookList.books[i].getName())) {
                bookList.books[i].setLending_situation(true);
                return;
            }
        }
        System.out.println("没有这本书");
    }
}
